package com.fhz.module_main.viewmodel

import androidx.lifecycle.LiveData
import androidx.lifecycle.ViewModel
import com.fhz.loginmvvm.callback.ApiResponse
import com.fhz.module_main.entity.RecommendEntity
import com.fhz.module_main.entity.UserEntity
import com.fhz.module_main.repository.IndexRepository
import com.fhz.module_main.repository.RecommendRepository
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject

/**
 * 时间:2023/4/25
 * @author Mr.Feng
 * 简述: shouye
 */
@HiltViewModel
class RecommendViewModel @Inject constructor(private val repository: RecommendRepository) : ViewModel()  {

    fun getRecommend() : LiveData<ApiResponse<RecommendEntity>> {
        return repository.getRecommend()
    }

//    fun insertUser(user: User){
//        viewModelScope.launch {
//            repository.insertUser(user)
//        }
//    }
}